Skip to content
QtWS25 Last Chance
  • set Qwebview url via js function

    Unsolved QML and Qt Quick qwebview qquick webview qml + js
    4
    0 Votes
    4 Posts
    2k Views
    ODБOïO
    Use 'Component.onCompleted' handler to assign directly your url, or to call a function which will do that. function setUrl(idOfWebView){ idOfWebView.url = "https://forum.qt.io" } WebView { id: myWebView anchors.fill: parent // url: "set url here " Component.onCompleted : { /* any JavaScript function or expressions */ // myWebView.url = "https://forum.qt.io" ( DIRECT ) //or u can call a function like this : // setUrl(myWebView) // pass id of your webView to the function. ( FUNCTION ) } } LA
  • 0 Votes
    2 Posts
    2k Views
    M
    @MrKozmon I'm having the exact same problem on Android. When I drag a QQuickWidget that is hosting a QML-based WebView on Android, the widget moves but the WebView is left in the original position. Wondering if there has been any progress or a workaround for this issue. I am using Qt 5.10.0, developing for an x86 Android platform.